function block = linearBlockDecoder_com(block, flag)
  if flag == 1 then
    code = block.inptr(1)(:)
    code = code(:)';
    //block.opar(1) is H
    //block.opar(2) is errTable
    //block.opar(3) is K
    s = modulo(code * block.opar(1), 2);
    err = block.opar(2)(bi2de(fliplr(s))+1, :)
    code = modulo(code+err, 2);
    block.outptr(1)(:) = code(1:block.opar(3))
  end 
endfunction

